package com.usian.usianleadonewsuser.controller;

import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.user.dtos.UserRelationDto;
import com.usian.model.user.pojos.ApUser;
import com.usian.usianleadonewsuser.service.AuthAppService;
import com.usian.usianleadonewsuser.service.AuthUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user/api/v1/user")
public class AuthUserController implements com.usian.apis.service.user.AuthUserController {
    @Autowired
    private AuthUserService authUserService;
    @RequestMapping("user_follow")
    @Override
    public ResponseResult user_follow(@RequestBody UserRelationDto dto) {
        return authUserService.user_follow(dto);
    }

    @RequestMapping("findById/{id}")
    @Override
    public ApUser findById(@PathVariable(value = "id") Integer id) {
        return authUserService.findById(id);
    }
}
